<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>卜咚问问</title>
    <link rel="stylesheet" href="../../libs/node_modules/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../style/common.css">
    <link rel="stylesheet" href="../../style/home/article.css">
    <link rel="stylesheet" href="../../style/investigation/investigation.css">
    <link rel="stylesheet" href="../../style/problem/problem.css">
	<link rel="stylesheet" href="../../style/investigation/investigation.css">

    <script src="../../libs/jquery-3.2.1.min.js"></script>
	<script src="../../jsc/axios.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="../../libs/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../../libs/layer-v3.1.1/layer/layer.js"></script>
    <script src="../../libs/node_modules/echarts/dist/echarts.js"></script>
	<script src="../../libs/vue.js"></script>
	<script src="../../jsc/vue-router.js"></script>

	<!--<script src="../../libs/static/UE/ueditor.config.js"></script>-->
	<!--<script src="../../libs/static/UE/ueditor.all.js"></script>-->
	<!--<script src="../../libs/static/UE/ueditor.parse.js"></script>-->


	<script src="../../jsc/UE/ueditor.config.js"></script>
	<script src="../../jsc/UE/ueditor.all.js"></script>
	<script src="../../jsc/UE/ueditor.parse.js"></script>
	<script src="https://echarts.baidu.com/build/dist/echarts.js"></script>


	<!--<script src="../../jsc/ueditor.config.js"></script>-->
	<!--<script src="../../jsc/ueditor.all.min.js"></script>-->
	<!--<script src="../../jsc/ueditor.parse.min.js"></script>-->



	<!--<script src="js/system.js"></script>-->
</head>
<body>
<div id="app">
	<header-component></header-component>
	<navinner-component></navinner-component>

	<!-- 主站导航 -->
	<navrow-component v-if="sitelevel == ''"></navrow-component>
	<!-- 行政站导航 -->
	<navtab2-component v-if="sitelevel != 5 && sitelevel != '' " :siteid="site_data"></navtab2-component>
	<!-- 基层站导航 -->
	<navtab3-component v-if="sitelevel==5" :siteid="site_data"></navtab3-component>

	<subpagebanner-component :siteid="site_data" bannerid="137"></subpagebanner-component>

	<main>
		<div class="content">
			<div class="article-detail">
				<div class="article-detail-l" style="width: 15rem">
					<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
						<router-link :to="'/list?type=1'" class="nav-link" :class="active==1 ? 'active' : '' ">问问列表</router-link>
						<router-link :to="'/list?type=2'" class="nav-link" :class="active==2 ? 'active' : '' ">热门问题</router-link>
						<router-link to="/newquestion" class="nav-link" :class="active==3 ? 'active' : '' ">提出问题</router-link>
						<router-link :to="'/list?type=3'" class="nav-link" :class="active==4 ? 'active' : '' ">待答问题</router-link>
						<!--<a class="nav-link active" id="v-pills-focus-tab" data-toggle="pill" href="#v-pills-focus" role="tab" aria-controls="v-pills-focus" aria-selected="true">问问列表</a>-->
						<!--<a class="nav-link" id="v-pills-vote-tab" data-toggle="pill" href="#v-pills-vote" role="tab" aria-controls="v-pills-vote" aria-selected="false">热门问题</a>-->
						<!--<a class="nav-link" id="v-pills-investigation-tab" data-toggle="pill" href="#v-pills-investigation" role="tab" aria-controls="v-pills-investigation" aria-selected="false">提出问题</a>-->
						<!--<a class="nav-link" id="v-pills-complaint-tab" data-toggle="pill" href="#v-pills-complaint" role="tab" aria-controls="v-pills-complaint" aria-selected="false">待答问题</a>-->
					</div>
				</div>
				<div class="tab-content" id="v-pills-tabContent">
					<router-view></router-view>
				</div>
			</div>
		</div>
	</main>

	<footer-component></footer-component>
	<!--<footer class="footer"></footer>-->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"  aria-hidden="true">
		<div class="modal-dialog modal-dialog-centered" role="document">
			<div class="modal-content">
				<div class="modal-body">
					<div class="info-box">
						<div class="info-header-img"></div>
						<div class="info-list">
							<div class="info-text">姓名：马云</div>
							<div class="info-text">年龄：56</div>
							<div class="info-text">民族：汉</div>
							<div class="info-text">政治面貌：党员</div>
						</div>
					</div>
					<div class="info-data">
						<div class="info-title">资料介绍：<span></span></div>
						<div class="info-innerText">
							身在舆论漩涡中的王倩，感谢网友们的支持，“但有些人的说法我无法接受，比如，我明明是正当维权，但硬被说成是某策划公司的炒作，还有人说我是演员。现在，我有几百个身份。”
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<script src="../../jsc/common.js"></script>
<script src="../../jsc/component.js"></script>
<script>

	var userAgent = navigator.userAgent.toLowerCase();
	var platform;
	if(userAgent == null || userAgent == ''){
		platform = 'WEB' ;
	}else{
		if(userAgent.indexOf("android") != -1 ){
			platform = 'ANDROID';
			location.href = "../../views/wap/ask.html";
		}else if(userAgent.indexOf("ios") != -1 || userAgent.indexOf("iphone") != -1 || userAgent.indexOf("ipad") != -1){
			platform = 'IOS';
			location.href = "../../views/wap/ask.html";
		}else if(userAgent.indexOf("windows phone") != -1 ){
			platform = 'WP';
			location.href = "../../views/wap/ask.html";
		}else{
			platform = 'WEB' ;
			//location.href = "";
		}
	}

	// function modalShow() {
	// 	//$('#myModal').modal('show');
	// }
	// function showTab(obj) {
	// 	var _this = $(obj);
	// 	var aria = _this.parent().parent().parent().parent().parent();
	// 	aria.find(".new_show").show();
	// 	aria.find(".old_show").hide();
	//
	// }
	// $(".nav-link").click(function () {
	// 	$(".old_show").show();
	// 	$(".new_show").hide();
	// });

	const routes = [
		{ path: '/', component: problemlist},
		{ path: '/list', component: problemlist,name:'list' },
		{ path: '/newquestion', component: newquestion,name:'newquestion' },
		{ path: '/pro', component: problemlist,name:'pro' },
		{ path: '/ans', component: problemlist,name:'ans' },
		{ path: '/detail', component: problemdetail,name:'detail' },
	];
	const router = new VueRouter({
		routes, // routes: routes 的简写
		// mode:'history'
	});

	new Vue({
		el:'#app',
		data:{
			active:2,
			sitelevel:'',
			site_data:{}
		},
		router,
		mounted(){
			if (localStorage.getItem('station')){
				this.sitelevel = JSON.parse(localStorage.getItem('station')).site_level
				this.site_data = JSON.parse(localStorage.getItem('station'));
			}
		},
		watch:{
			'$route':function () {
				console.log(this.$route);
				if (this.$route.path=='/newquestion'){
					this.active = 3
				} else{
					if (this.$route.query.type==3){
						this.active=4
					}else{
						this.active = this.$route.query.type
					}
				}
			}
		},
		methods:{

		},
	})

</script>
</body>
</html>
